package com.dlc.shop.bean.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 商家钱包记录
 *
 * @author Dwl
 * @date 2019-09-19 14:02:57
 */
@Data
@TableName("tz_shop_wallet_log")
public class ShopWalletLog implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId
    @Schema(description = "店铺钱包id")
    private Long walletLogId;

    @Schema(description = "店铺id")
    private Long shopId;

    @Schema(description = "支付系统类型")
    private Integer paySysType;

    @Schema(description = "关联订单号")
    private String orderNumber;

    @Schema(description = "退款单id")
    private String refundSn;

    @Schema(description = "收支类型 0支出 1收入")
    private Integer ioType;

    @Schema(description = "金额类型 0 未结算金额 1可提现金额  2冻结金额 3总结算金额")
    private Integer amountType;

    @Schema(description = "改变金额")
    private Double changeAomunt;

    @Schema(description = "原因 0用户支付 1订单结算 2 用户申请退款 3 拒绝用户退款申请 4 提现申请 5 提现申请被拒绝 6 提现申请通过")
    private Integer reason;

    @Schema(description = "用户金额（支付实付金额，退款实际申请金额）")
    private Double userAmount;

    @Schema(description = "平台补贴金额")
    private Double platformAmount;

    @Schema(description = "分销占用金额")
    private Double distributionAmount;

    @Schema(description = "平台佣金")
    private Double platformCommission;

    @Schema(description = "商家优惠金额")
    private Double shopReduceAmount;

    @Schema(description = "商品总金额")
    private Double totalAmount;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "店铺名称")
    @TableField(exist = false)
    private String shopName;

    @Schema(description = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date startTime;

    @Schema(description = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date endTime;

    @Schema(description = "店铺会员折扣金额")
    private Double shopMemberDiscountAmount;

    @Schema(description = "平台会员折扣金额")
    private Double platformMemberDiscountAmount;
}
